\Verb+char* strcpy(char* dest, const char* sour)+\\
kopiuje tekst z {\tt sour} do {\tt dest} ze znakiem \verb+'\0'+;
zwraca  {\tt dest}.


Plik {\sf strcpy.c}.
\begin{lstC}
#include "strdruk.h"

#ifdef __cplusplus
#include <cstring>
#include <cstdlib>
#include <cstdio>
#else
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#endif

#define SIZE 10

int main(void) {
  char sour[] = "Hello"; 
  char *dest;
  dest = (char*) malloc(sizeof *dest * (SIZE));
  drukPoZnaku(sour);
  
  strcpy(dest, sour);
  
  fprintf(stdout, "After strcpy(char* dest, const char* sour)\n");
  drukPoZnaku(dest);
  free(dest);
}
\end{lstC}

Uruchomienie.
\begin{lstV}
[0] = 'H'
[1] = 'e'
[2] = 'l'
[3] = 'l'
[4] = 'o'
[5] = NULL
After strcpy(char* dest, const char* sour)
[0] = 'H'
[1] = 'e'
[2] = 'l'
[3] = 'l'
[4] = 'o'
[5] = NULL
\end{lstV}